package sole.hawking.image.test;

/**
 * Open is an algorithm to open a binary image using a 3x3 kernel using erosion
 * followed by dilation.
 * 
 * @author Simon Horne.
 */
public class OpenFilter extends Thread {

    /**
     * Default no-arg constructor.
     */
    public OpenFilter() {
    }

    /**
     * Method to open a binary image by eroding and then dilating the image
     * using the specified kernel.
     */
    public static BinaryFast open_image(BinaryFast b, int[] kernel,
            int iterations) {
        b = ErodeFilter.erode_image(b, kernel, iterations);
        b = DilateFilter.dilate_image(b, kernel, iterations);
        return b;
    }

}
